// eslint-disable-next-line no-unused-vars
import { getAction, postAction } from '@/api/manage'

// 分页列表
const list = (params) => getAction('/admin/role/page', params)
// 全部
const all = (params) => getAction('/admin/role/all', params)
// 详情
const detail = (params) => getAction(`/admin/role/detail/${params}`)
// 删除
const del = (params) => postAction(`/admin/role/delete/${params}`)
// 批量删除
const batchDel = (params) => postAction(`/admin/role/batchDel`, params)
// 新增
const create = (params) => postAction('/admin/role/create', params)
// 编辑
const edit = (params) => postAction('/admin/role/update', params)
// 导出
const exports = (params) => postAction('/admin/role/export', params, 'blob')
// 下载模板
const download = (params) => postAction('/admin/role/download', params, 'blob')
// 导入
const imports = (params) => postAction('/admin/role/import', params)

export {
  list,
  all,
  detail,
  del,
  batchDel,
  create,
  edit,
  exports,
  download,
  imports
}
